<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        // class PeoPle {

        // }
        // 定义空对象
        let obj1 = {}


        //人：穿装备拿武器，走路，攻击（普通，释放技能），掉血，吃药（复活币，雪豹），死掉，复活，经验属性，
        //还有等级属性，捡装备，打开背包，人物属性（防御力，攻击力），调戏怪物
        // 物品：药（复活币，雪豹，九转还魂丹），穿戴装备（衣服，武器）
        // 怪物：穿装备拿武器，走路，攻击（普通，释放技能），掉血，死掉，还有等级属性，
        // 属性（防御力，攻击力），失去理智，降低防御力，增加仇恨值和伤害，脸红

        let people = {
            name: '杨院长',
            hp: 10000,
            mp: 500,
            xp: 20000,
            level: 200,
            fangyuli: 200,
            gongjili: 400,
            buff: [], // 红buff 蓝buff 大龙buff
            debuff: [], // 死亡，中毒，冰冻，减速，虚弱，眩晕
            status: 1, // 死亡,正常
            yichangzhuangtai: [],
            shiyongwupin() { },
            chuanzhuangbei(yingguangbang) {
                this.gongjili += yingguangbang.gongjili
            },
            move(wawa, kaka) {
                if (wawa)
                    console.log('杨院长移动到哈基米身前')
                if (kaka)
                    console.log('杨院长移动到哈基米身后')
            },
            gongji(oStr) {

                return '攻击' + oStr

            },
            jineng1: {
                name: '闪电五连鞭',
                beilv: 5
            },
            jineng2: {
                name: '噩梦缠绕',
                beilv: 10
            },
            kaibao() { },
        }
        let people2 = {
            name: '周波',
            hp: 10000,
            mp: 500,
            xp: 20000,
            level: 200,
            fangyuli: 200,
            gongjili: 400,
            jineng: {
                name: '喵喵叫',
                shanghai: 2000
            }
        }

        let guaiwu = {
            name: '哈基米',
            hp: people.hp * 20,
            mp: 100,
            xp: 20000,
            level: 20,
            fangyuli: people.fangyuli / 2,
            gongjili: 30,
            buff: [], // 红buff 蓝buff 大龙buff
            debuff: [], // 死亡，中毒，冰冻，减速，虚弱，眩晕
            status: 1, // 死亡,正常
            yichangzhuangtai: [],
            gongji(oStr) {
                return '攻击' + oStr
            },
            jineng: {
                name: '撕咬',
                shanghai: 500,
            }
        }

        let wupin = {
            yao: {
                xuebao: {
                    desc: '锐克五代',
                    xueliang: 2000
                }
            },
            zhuangbei: {
                jiechi: {
                    name: '杨院长的戒尺',
                    gongjili: 999,
                    desc: '杨院长的戒尺，金属制品',
                },
                dianbang: {
                    name: '杨院长的私改电棒',
                    gongji: 2000,
                    desc: '杨院长的私改电棒，狠狠惩治哈基米',
                    zhuangtai: {
                        desc: '麻痹'
                    }
                },
                wulixueshengjian: {
                    name: '物理学（电）圣剑',
                    gongji: 999999999,
                    desc: '杨院长藏起来的物理学（电）圣剑，无敌',
                }

            }
        }
        let zhuangtai = {
            silie: {
                desc: '撕裂',
                hp: 1000,
                hpyinxiang() {
                    console.log('被撕裂，hp-1000')
                }
            },
            chanrao: {
                desc: '缠绕',
                hp: 2000,
                hpyinxiang() {
                    console.log('被缠绕，不能呼吸，hp-2000')
                }
            },
            mabi: {
                desc: '麻痹',
                hp: 500,
                xiaoguo: '被麻痹，笔直笔直的，hp-500'


            }
        }

        console.log(`杨院长在巡视时发现了一只${guaiwu.name}`)
        console.log(`${guaiwu.name}对杨院长发起了攻击`)
        console.log(`${guaiwu.name}先手攻击`)
        console.log(`${guaiwu.name}使用了${guaiwu.jineng.name}`)
        people.hp -= guaiwu.gongjili + guaiwu.jineng.shanghai - people.fangyuli
        console.log(`造成了${guaiwu.gongjili + guaiwu.jineng.shanghai - people.fangyuli}伤害`)
        console.log(`杨院长的血量为：${people.hp}`);
        console.log(`杨院长装备了${wupin.zhuangbei.dianbang.name},攻击力上升了${wupin.zhuangbei.dianbang.gongji}`)
        people.gongjili += wupin.zhuangbei.dianbang.gongji;
        console.log(`杨院长对哈基米发动了${people.jineng1.name},造成了${people.gongjili * people.jineng1.beilv - guaiwu.fangyuli}伤害`)
        console.log(`${guaiwu.name}${zhuangtai.mabi.xiaoguo}`)
        guaiwu.hp -= (people.gongjili * people.jineng1.beilv - guaiwu.fangyuli - zhuangtai.mabi.hp)
        console.log(`${guaiwu.name}的血量为：${guaiwu.hp}`)
        console.log(`${people.name}触发了连击`)
        console.log(`${people.name}对${guaiwu.name}连续攻击8次`)
        console.log(`造成了${(people.gongjili * people.jineng1.beilv - guaiwu.fangyuli) * 8}伤害`)
        guaiwu.hp -= ((people.gongjili * people.jineng1.beilv - guaiwu.fangyuli) * 8)
        console.log(`${guaiwu.name}的血量为：${guaiwu.hp}`)
        console.log(`${guaiwu.name}使用了${guaiwu.jineng.name}`)
        console.log(`造成了${guaiwu.jineng.shanghai - people.fangyuli}伤害`)
        console.log(`杨院长的血量为：${people.hp - (guaiwu.jineng.shanghai - people.fangyuli)}`);
        console.log(`${guaiwu.name}开始喵喵叫`)
        console.log(`${guaiwu.name}召唤了${people2.name}`)
        console.log(`${guaiwu.name}使用了${guaiwu.jineng.name}`)
        people.hp -= guaiwu.gongjili + guaiwu.jineng.shanghai - people.fangyuli
        console.log(`造成了${guaiwu.gongjili + guaiwu.jineng.shanghai - people.fangyuli}伤害`)
        console.log(`杨院长的血量为：${people.hp}`);
        console.log(`${people2.name}使用了${people2.jineng.name},造成了${people2.jineng.shanghai}伤害`)
        people.hp -= people2.jineng.shanghai
        console.log(`杨院长的血量为：${people.hp}`);
        console.log('杨院长生气了，花了900块给自己买了一个锐克五代')
        console.log(`杨院长使用了${wupin.yao.xuebao.desc},回复了${wupin.yao.xuebao.xueliang}血`)
        people.hp += wupin.yao.xuebao.xueliang
        console.log(`杨院长的血量为：${people.hp}`);
        console.log(`杨院长装备了${wupin.zhuangbei.jiechi.desc},攻击力上升了${wupin.zhuangbei.jiechi.gongjili}`)
        people.gongjili += wupin.zhuangbei.jiechi.gongjili
        

    </script>
</body>

</html>